<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', function () {
    return view('welcome');
});

// 后台首页
Route::get('admin/index','admin\HomeController@index');
Route::get('admin/test','admin\HomeController@test');

// 用户登录
Route::get('admin/login','admin\LoginController@index');
Route::post('admin/login/verify','admin\LoginController@verify');

// 栏目
Route::prefix('admin/category')->group(function(){
	Route::get('/','admin\CategoryController@index');
	Route::get('info/{catid}','admin\CategoryController@info')->where('catid','[0-9]');
	Route::get('del/{catid}','admin\CategoryController@del')->where('catid','[0-9]');
	Route::post('save','admin\CategoryController@save');
})


// Auth::routes();

Route::get('/home', 'HomeController@index')->name('home');
